<%--
  Created by IntelliJ IDEA.
  User: wll
  Date: 2021/3/2
  Time: 19:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="js/jquery-3.3.1.min.js"></script>
<body>
<button type="button" id="anniuyi"> 我是一个按钮 </button>
</body>
<script type="text/javascript">
    //为id="testAjax1"的组件绑定点击事件
    $("#anniuyi").click(function(){
        //发送异步调用
        $.ajax({
            type:"POST",//请求方式：POST请求
            url:"find1.do",//请求的地址
            data:'{"name":"lisi","password":"1234"}',//请求参数（也就是请求内容）
            dataType:"json",//响应正文类型
            contentType:"application/json",//请求正文的MIME类型
        });
    });
</script>
</html>
